﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class DailyProgram
{

    public DailyProgram(IEnumerable<MealItem> Eating,
                IEnumerable<ExerciseSet> Exercises) {
        this.Eating = Eating;
        this.Exercises = Exercises;
    }

    public IEnumerable<MealItem> Eating { get; private set; }

    public IEnumerable<ExerciseSet> Exercises { get; private set; }



    /* Boilerplate */

    public override string ToString() {

        string ret = string.Empty;

        ret += "Eating = " + this.Eating;
        ret += ", ";
        ret += "Exercises = " + this.Exercises;

        ret = "{DailyProgram: " + ret + "}";
        return ret;

    }


    public object this[string field] {
        get {
            if (field == "Eating") return Eating;
            if (field == "Exercises") return Exercises;
            throw new ArgumentException();
        }
        set {
            if (field == "Eating") { Eating = (IEnumerable<MealItem>)value; return; }
            if (field == "Exercises") { Exercises = (IEnumerable<ExerciseSet>)value; return; }
            throw new ArgumentException();
        }
    }

}
